<layout name='Layout/layout_page' />

	<ol class="breadcrumb">
		<li><a href="<{:U('Events/index')}>"><{:L('_menu_events')}></a></li>
      	<li class="active"><{:L('_public_edit')}></li>
    </ol>

	<form id="ajaxForm" action="<{:U('Events/update')}>" method="post" class="form-horizontal form-validata">		

		<div class="form-group">
			<label class="col-md-2 control-label" for="name">Title</label>
			<div class="col-md-9">
				<input type="text"
                class="form-control"
				name="title"
				id="title"
				value="<{$list['title']}>" 
				data-rule-required="true"
				/>
			</div>
		</div>		

		<div class="form-group">
			<label class="col-md-2 control-label" for="picname">thumbnail</label>
			<div class="col-md-9">
				<img class="thumbPic" id="picname_src" src="<{$list['picname']}>" />
				<input type="hidden" name="picname" id="picname" value="<{$list['picname']}>" />
				<p class="pic-btn"><input type="button" value="Upload" class="btn btn-default btn-sm" onclick="uploadImage( '<{:U('Admin/Upload/singleImage')}>' , 'picname')"/> <input type="button" value="Delete" class="btn btn-default btn-sm" onclick="delImage('picname')"/></p>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-2 control-label" for="name">Panelist</label>
			<div class="col-md-9">
				<textarea name="content" id="container"><{$list['content']}></textarea>
				<script type="text/javascript" src="<{:C('UE_DIR')}>/my.config.js"></script>
				<script type="text/javascript" src="<{:C('UE_DIR')}>/ueditor.all.js"></script>
				<script type="text/javascript">
				var defPath = "<{:C('UPLOAD_PATH')}>";
				window.UEDITOR_CONFIG.imagePath= defPath;  //插入<{:L(_public_edit)}>器中图片路径修正
				window.UEDITOR_CONFIG.filePath= defPath; //插入<{:L(_public_edit)}>器中文件路径修正
				window.UEDITOR_CONFIG.scrawlPath= defPath; //涂鸦默认路径
				var editor = UE.getEditor('container');
				</script>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-2 control-label" for="name">Speaker Bio</label>
			<div class="col-md-9">
				<textarea name="speaker" id="speaker"><{$list['speaker']}></textarea>
				<script type="text/javascript">
				var editor = UE.getEditor('speaker');
				</script>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-2 control-label" for="keyword">Only member</label>
			<div class="col-md-9">
				<label class="radio-inline">
					<input type="radio" name="onlyMember" value="1" <php>if($list['onlyMember']==='1')echo checked;</php>> Yes
				</label>
				<label class="radio-inline">
					<input type="radio" name="onlyMember" value="0" <php>if($list['onlyMember']==='0')echo checked;</php>> No
				</label>
			</div>
		</div>	

		<div class="form-group">
			<label class="col-md-2 control-label" for="name">Date</label>
			<div class="col-md-3">
				<input type="text"
                class="form-control"
				name="date"
				id="date"
				value="<{$list['date']|date="Y-m-d",###}>" 
				data-rule-required="true"
				/>
				<script> 
				$(function(){
					$("#date" ).datepicker({
						minDate: new Date()
					}); 				
				});
				</script>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-2 control-label" for="name">Starting Time</label>
			<div class="col-md-3">
				<select name="starting" id="starting" class="form-control" data-rule-required="true">
					<option value="">--select--</option>
					<option value="8:00 AM">8:00 AM</option>
					<option value="8:30 AM">8:30 AM</option>
					<option value="9:00 AM">9:00 AM</option>
					<option value="9:30 AM">9:30 AM</option>
					<option value="10:00 AM">10:00 AM</option>
					<option value="10:30 AM">10:30 AM</option>
					<option value="11:00 AM">11:00 AM</option>
					<option value="11:30 AM">11:30 AM</option>
					<option value="12:00 AM">12:00 AM</option>
					<option value="12:30 AM">12:30 AM</option>
					<option value="1:00 PM">1:00 PM</option>
					<option value="1:30 PM">1:30 PM</option>
					<option value="2:00 PM">2:00 PM</option>
					<option value="2:30 PM">2:30 PM</option>
					<option value="3:00 PM">3:00 PM</option>
					<option value="3:30 PM">3:30 PM</option>
					<option value="4:00 PM">4:00 PM</option>
					<option value="4:30 PM">4:30 PM</option>
					<option value="5:00 PM">5:00 PM</option>
					<option value="5:30 PM">5:30 PM</option>
					<option value="6:00 PM">6:00 PM</option>
					<option value="6:30 PM">6:30 PM</option>
					<option value="7:00 PM">7:00 PM</option>
					<option value="7:30 PM">7:30 PM</option>
					<option value="8:00 PM">8:00 PM</option>
					<option value="8:30 PM">8:30 PM</option>
					<option value="9:00 PM">9:00 PM</option>
					<option value="9:30 PM">9:30 PM</option>
					<option value="10:00 PM">10:00 PM</option>
				</select>
			</div>
			<label class="col-md-2 control-label" for="name">Ending Time</label>
			<div class="col-md-3">
				<select name="ending" id="ending" class="form-control" data-rule-required="true">
					<option value="">--select--</option>
					<option value="8:00 AM">8:00 AM</option>
					<option value="8:30 AM">8:30 AM</option>
					<option value="9:00 AM">9:00 AM</option>
					<option value="9:30 AM">9:30 AM</option>
					<option value="10:00 AM">10:00 AM</option>
					<option value="10:30 AM">10:30 AM</option>
					<option value="11:00 AM">11:00 AM</option>
					<option value="11:30 AM">11:30 AM</option>
					<option value="12:00 AM">12:00 AM</option>
					<option value="12:30 AM">12:30 AM</option>
					<option value="1:00 PM">1:00 PM</option>
					<option value="1:30 PM">1:30 PM</option>
					<option value="2:00 PM">2:00 PM</option>
					<option value="2:30 PM">2:30 PM</option>
					<option value="3:00 PM">3:00 PM</option>
					<option value="3:30 PM">3:30 PM</option>
					<option value="4:00 PM">4:00 PM</option>
					<option value="4:30 PM">4:30 PM</option>
					<option value="5:00 PM">5:00 PM</option>
					<option value="5:30 PM">5:30 PM</option>
					<option value="6:00 PM">6:00 PM</option>
					<option value="6:30 PM">6:30 PM</option>
					<option value="7:00 PM">7:00 PM</option>
					<option value="7:30 PM">7:30 PM</option>
					<option value="8:00 PM">8:00 PM</option>
					<option value="8:30 PM">8:30 PM</option>
					<option value="9:00 PM">9:00 PM</option>
					<option value="9:30 PM">9:30 PM</option>
					<option value="10:00 PM">10:00 PM</option>
				</select>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-2 control-label">Address</label>
			<div class="col-md-3">
			<input type="text" class="form-control" name="address" id="address" value="<{$list['address']}>"  data-rule-required="true" data-rule-en="true">
			</div>

			<label class="col-md-2 control-label">City</label>
			<div class="col-md-3">
			<input type="text" class="form-control" name="city" id="city" value="<{$list['city']}>" data-rule-required="true" data-rule-en="true">
			</div>
		</div>
		<div class="form-group">
			<label class="col-md-2 control-label">State</label>
			<div class="col-md-3">
				<select name="state" id="state" class="form-control">
					<option value="">--select--</option>
					<volist name="stateList" id="vo">
					<option value="<{$vo.name}>"><{$vo.name}></option>
					</volist>
				</select>
			</div>
			<label class="col-md-2 control-label">Zip code</label>
			<div class="col-md-3">
			<input type="text" class="form-control" name="zip" id="zip" value="<{$list['zip']}>" data-rule-required="true" data-rule-en="true">
			</div>
		</div>
	
		<div class="form-group">
			<div class="col-md-11 col-sm-offset-1">
				<button type="submit" class="btn btn-info"><{:L('_public_edit')}></button>
			</div>
		</div>
		<input type="hidden" name="id" value="<{$list['id']}>">

		<div style="height:200px"></div>
	</form>


<input type="hidden" id="menu_action" value="events" />
<script type="text/javascript">
$("#starting").val('<{$list["starting"]}>');
$("#ending").val('<{$list["ending"]}>');
$("#state").val('<{$list["state"]}>');
</script>